package teaching.exception;

import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import teaching.util.StatusCode;

/**
 * Author:20201002983_郑雨蓓
 * Date: 2022/12/25
 * Description:
 */

@Getter
@NoArgsConstructor
public class NotAllowException extends RuntimeException {
    private int code;
    private String message;

    public NotAllowException(String message) {
        super(message);
        this.code = StatusCode.SERVER_ERROR.code;//500
        this.message=message;
    }

    public NotAllowException(int code, String message) {
        super(message);
        this.code = code;
        this.message=message;
    }
}
